package com.tarena.all;
import java.util.*;

public class Jijiaiqi{

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		double pay=0;
		
		Scanner sc=new Scanner(System.in);
		System.out.println("请输入等待时间：");
		double waittime=sc.nextInt();
		
		System.out.println("请输入下车时间：");
		int outtime=sc.nextInt();
		
		System.out.println("请输入行驶公里数：");
		double mail=sc.nextInt();
		if(outtime>=7&&outtime<=23)
			outtime=1;
		if(outtime<=7||outtime>=23)
			outtime=2;
		switch(outtime){
		case 1:{
			if(mail<=3){System.out.println("付款12元");}
			else if(mail>3||mail<=15){
				pay=(mail-3)*2+(waittime/60/5)*2;
				System.out.println("付款"+pay+"元");
			}
			else if(mail>15){
				pay=34+(mail-15)*3+(waittime/60/5)*2;
				System.out.println("付款"+pay+"元");
			}
		}break;
		case 2:{
			
			if(mail<=3){System.out.println("付款12元");}
			else if(mail>3||mail<=15){
				pay=(mail-3)*2.3+12+(waittime/60/5)*2;
				System.out.println("付款"+pay+"元");
			}
			else if(mail>15){
				pay=34+(mail-15)*3.3+(waittime/60/5)*2;
				System.out.println("付款"+pay+"元");
			}
		}break;
		default: break;
		
		}

	}

}
